public class Test {
    public static int[] func(int[] array) {
        int i = 0;
        int j = array.length-1;
        while(i < j) {
            if(array[i] % 2 != 0) {
                i++;
            }
            if(array[j] % 2 == 0) {
                j--;
            }
            if(array[i] % 2 == 0 && array[j] % 2 != 0) {
                int tmp = array[i];
                array[i] = array[j];
                array[j] = tmp;
            }
        }
        return array;
    }
    public static void main(String[] args) {
        int[] array = {1,2,4,7,6,8,11,13,10,17,20};
        System.out.println(func(array));
    }
    public static void main3(String[] args) {
        Integer a = 100;
        Integer b = 100;
        System.out.println(a == b);
        Integer aa = 200;
        Integer bb = 200;
        System.out.println(aa == bb);
    }
    public static void main2(String[] args) {
        Integer i = 100;
        int a = i;//自动拆箱
        int aa = i.intValue();//显式拆箱
        double b = i.doubleValue();
        System.out.println(i);
        System.out.println(a);
    }
    public static void main1(String[] args) {
        int i = 10;
        Integer a = i;//自动装箱
        Integer b = Integer.valueOf(99);//显式装箱
    }
}
